import request from '@/utils/request'

export const getUserAllRoles = () => 
request({
    url: '/role/roles',
    method: 'get'
})


export const addRole = (data:any) => 
request({
    url: '/role/setRole',
    method: 'post',
    data
})

export const deleteRole = (id:number) => 
request({
    url: `/role/setRole/${id}`,
    method: 'delete'
})

export const updateRole = (data:any) => 
request({
    url: '/role/setRole',
    method: 'put',
    data
})